package org.kpli.jak.db.third;

import org.hibernate.SessionFactory;
import org.hibernate.cfg.Configuration;

public class HibernateMain {

	private static final SessionFactory SESSION_FACTORY;

	static {

		try {

			SESSION_FACTORY = new Configuration().configure()
					.buildSessionFactory();

		} catch (Throwable th) {

			System.err.println("Enitial SessionFactory creation failed" + th);

			throw new ExceptionInInitializerError(th);

		}

	}

	public static SessionFactory getSessionFactory() {
		return SESSION_FACTORY;
	}
}
